package com.situ.week1.day3;

public class Student extends Person{
    private String className;

    public Student() {
        super();
    }

    public Student(int id, String name, int age, String className) {
        super(id, name, age);
        this.className = className;
    }

    public void study() {
        System.out.println(className + "班的" + name + "正在学习");
    }

    @Override
    public String toString() {
        return "Student{" +
                "className='" + className + '\'' +
                ", id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
